<h1><%= link_to "Managers", :action => "index" %> 
  &rarr; Manager Profile
</h1>



<div class="details">
  <%= image_tag "profile.gif", :alt => "profile", :class => "profile" %>
  <h2><%=h @manager.name %> <%= image_for_admin_status(@manager) %></h2>
  <p class="email"><%= mail_to h(@manager.email) %></p>


  <% # admin can edit everyone %>
  <% if admin? %>
  <div class="modify admin">
    <%= link_to "edit", :action => "edit", :id => @manager.id %> | 
    <%= link_to "destroy", { :action => "destroy", :id => @manager.id }, 
                            :confirm => 'Are you sure?', 
                            :method  => :delete %>
  </div>

  <% # user can edit himself %>
  <% elsif manager_owns_record? %>
  <div class="modify user">
    <%= link_to "edit your profile", :action => "edit", 
                                     :id     => @manager.id %>
  </div>
  <% end %>
</div>
